// malred-vue-template-js/src/api/admin/index.js
/*
 * @Author Malred
 * @Date 2025-05-31 18:26:11
 * @Description 
 */

import request from "../request.js";

export default {
    // 查询全部
    queryAdmin(body) {
        return request({url: '/api/admin', method: 'get', data: '', params: body})
    },
    // 根据id查询单个
    queryAdminDetail(id) {
        return request({url: '/api/admin' + id, method: 'get', data: '', params: ''})
    },
    // 添加
    addAdmin(body) {
        return request({url: '/api/admin', method: 'post', data: body, params: ''})
    },
    // 修改
    editAdmin(body, id) {
        return request({url: '/api/admin' + id, method: 'put', data: body, params: ''})
    },
    // 删除
    deleteAdmin(ids) {
        return request({url: '/api/admin' + ids.join(','), method: 'delete', data: '', params: ''})
    },
}